
    /**  
    * @Title: MongoPropertiesConfiguration.java
    * @Package com.efast.cafe.commponent.log.configuration
    * @Description: TODO(用一句话描述该文件做什么)
    * @author Administrator
    * @date 2018年9月4日
    * @version V1.0  
    */
    
package com.efast.cafe.commponent.log.configuration;

import java.util.List;

import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

import com.efast.cafe.commponent.log.constant.LogConstant;

/**
    * @ClassName: MongoPropertiesConfiguration
    * @Description: 日志服务的mongodb属性配置
    * @author Administrator
    * @date 2018年9月4日
    *
    */
@ConditionalOnProperty(
        name=LogConstant.K_STORAGE,
        havingValue="mongodb"
)
@Configuration
@ConfigurationProperties(
		   prefix = LogConstant.K_DATASOURCES_PREFIX)
public class MongoPropertiesConfiguration {

	private String database;
	private List<String> hosts;
	private List<Integer> ports;
	
	private String replicaSet;
	 private String username;
	 private String password;
	 private String authenticationDatabase;
	 private Integer minConnectionPerHost = 10;
	 private Integer maxConnectionPerHost = 100;
	 private Integer threadsAllowedToBlockForConnectionMultiplier;
	 private Integer maxWaitTime;
	 private Integer serverSelectionTimeout;
	 private Integer connectTimeout;
	 private Boolean sslEnabled;
	 private Integer socketTimeout;
	 public MongoPropertiesConfiguration() {
	 
	 }
	 
	 public String getDatabase() {
	  return database;
	 }
	 
	 public void setDatabase(String database) {
	  this.database = database;
	 }
	 
	 public List<String> getHosts() {
	  return hosts;
	 }
	 
	 public void setHosts(List<String> hosts) {
	  this.hosts = hosts;
	 }
	 
	 public List<Integer> getPorts() {
	  return ports;
	 }
	 
	 public void setPorts(List<Integer> ports) {
	  this.ports = ports;
	 }
	 
	 public String getReplicaSet() {
	  return replicaSet;
	 }
	 
	 public void setReplicaSet(String replicaSet) {
	  this.replicaSet = replicaSet;
	 }
	 
	 public String getUsername() {
	  return username;
	 }
	 
	 public void setUsername(String username) {
	  this.username = username;
	 }
	 
	 public String getPassword() {
	  return password;
	 }
	 
	 public void setPassword(String password) {
	  this.password = password;
	 }
	 
	 public String getAuthenticationDatabase() {
	  return authenticationDatabase;
	 }
	 
	 public void setAuthenticationDatabase(String authenticationDatabase) {
	  this.authenticationDatabase = authenticationDatabase;
	 }

	public Integer getMinConnectionPerHost() {
		return minConnectionPerHost;
	}

	public void setMinConnectionPerHost(Integer minConnectionPerHost) {
		this.minConnectionPerHost = minConnectionPerHost;
	}

	public Integer getMaxConnectionPerHost() {
		return maxConnectionPerHost;
	}

	public void setMaxConnectionPerHost(Integer maxConnectionPerHost) {
		this.maxConnectionPerHost = maxConnectionPerHost;
	}

	public Integer getThreadsAllowedToBlockForConnectionMultiplier() {
		return threadsAllowedToBlockForConnectionMultiplier;
	}

	public void setThreadsAllowedToBlockForConnectionMultiplier(Integer threadsAllowedToBlockForConnectionMultiplier) {
		this.threadsAllowedToBlockForConnectionMultiplier = threadsAllowedToBlockForConnectionMultiplier;
	}

	public Integer getMaxWaitTime() {
		return maxWaitTime;
	}

	public void setMaxWaitTime(Integer maxWaitTime) {
		this.maxWaitTime = maxWaitTime;
	}

	public Integer getServerSelectionTimeout() {
		return serverSelectionTimeout;
	}

	public void setServerSelectionTimeout(Integer serverSelectionTimeout) {
		this.serverSelectionTimeout = serverSelectionTimeout;
	}

	public Integer getConnectTimeout() {
		return connectTimeout;
	}

	public void setConnectTimeout(Integer connectTimeout) {
		this.connectTimeout = connectTimeout;
	}

	public Boolean getSslEnabled() {
		return sslEnabled;
	}

	public void setSslEnabled(Boolean sslEnabled) {
		this.sslEnabled = sslEnabled;
	}

	public Integer getSocketTimeout() {
		return socketTimeout;
	}

	public void setSocketTimeout(Integer socketTimeout) {
		this.socketTimeout = socketTimeout;
	}

	
  
	
	
}
